package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysUserDeptMapper;
import com.ruoyi.system.domain.SysUserDept;
import com.ruoyi.system.service.ISysUserDeptService;

/**
 * 用户---分组Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-08-18
 */
@Service
public class SysUserDeptServiceImpl implements ISysUserDeptService 
{
    @Autowired
    private SysUserDeptMapper sysUserDeptMapper;

    /**
     * 查询用户---分组
     * 
     * @param userId 用户---分组ID
     * @return 用户---分组
     */
    @Override
    public SysUserDept selectSysUserDeptById(Long userId)
    {
        return sysUserDeptMapper.selectSysUserDeptById(userId);
    }

    /**
     * 查询用户---分组列表
     * 
     * @param sysUserDept 用户---分组
     * @return 用户---分组
     */
    @Override
    public List<SysUserDept> selectSysUserDeptList(SysUserDept sysUserDept)
    {
        return sysUserDeptMapper.selectSysUserDeptList(sysUserDept);
    }

    /**
     * 新增用户---分组
     * 
     * @param sysUserDept 用户---分组
     * @return 结果
     */
    @Override
    public int insertSysUserDept(SysUserDept sysUserDept)
    {
        return sysUserDeptMapper.insertSysUserDept(sysUserDept);
    }

    /**
     * 修改用户---分组
     * 
     * @param sysUserDept 用户---分组
     * @return 结果
     */
    @Override
    public int updateSysUserDept(SysUserDept sysUserDept)
    {
        return sysUserDeptMapper.updateSysUserDept(sysUserDept);
    }

    /**
     * 批量删除用户---分组
     * 
     * @param userIds 需要删除的用户---分组ID
     * @return 结果
     */
    @Override
    public int deleteSysUserDeptByIds(Long[] userIds)
    {
        return sysUserDeptMapper.deleteSysUserDeptByIds(userIds);
    }

    /**
     * 删除用户---分组信息
     * 
     * @param userId 用户---分组ID
     * @return 结果
     */
    @Override
    public int deleteSysUserDeptById(Long userId)
    {
        return sysUserDeptMapper.deleteSysUserDeptById(userId);
    }
}
